*/SAS code for Brennan et al. Treadmill experience mediates the perceptual-motor aftereffect of treadmill walking
*/ Linear mixed effects models to assess change over time at the group and individual levels (DV is a ratio: post drift/pre drift) 
*/ Please direct questions to Jonathan Bakdash, jzb3e@virginia.edu

*/Put Brennan_ratios_narrow_SAS.xls file in c:\SAS_Data
*/Creates library called "tread"
libname tread 'c:\SAS_Data\';

*/ Aftereffect for treadmill walking over time, DV = ratio of post drift over pre drift
	proc mixed data=tread.Brennan_ratios_narrow_SAS COVTEST;
	CLASS Participant1; 
	MODEL Treadmill = Trial1 /solution fullx outpred=predict;
	RANDOM Trial1 Int/ Type = AR subject=Participant1 solution V G gcorr vcorr;
	make 'covparms' out=covs;
	run;
	

*/ Aftereffect for real-world walking over time, DV = ratio of post drift over pre drift
	proc mixed data=tread.Brennan_ratios_narrow_SAS COVTEST;
	CLASS Participant2; 
	MODEL Walking = Trial2 /solution fullx outpred=predict;
	RANDOM Int Trial2/ Type = UN subject=Participant2 solution G gcorr vcorr;
	make 'covparms' out=covs;
	run;
	